﻿package com.thinktube
{
	import flash.display.Sprite;
	import com.thinktube.sectionBoard;
	import flash.events.*;
	import flash.xml.*;


	public class quesBoard extends Sprite
	{
		public var section0:sectionBoard;
		public var section1:sectionBoard;
		public var answerBank:Array = new Array();
		public var correctBank:Array = new Array();
		
		public function quesBoard(_quesBank:Array)
		{
			
			section0 = new sectionBoard(_quesBank[0]);
			section0.y = 0;
			addChild(section0);

			section1 = new sectionBoard(_quesBank[1]);
			section1.y = 100;
			addChild(section1);
			
			
			correctBank.push(_quesBank[0].attribute("correct"))
			correctBank.push(_quesBank[1].attribute("correct"))
			
			submit_btn.buttonMode = true;
			submit_btn.addEventListener(MouseEvent.CLICK,SubmitEvent);

		}
		
		private function SubmitEvent(e:Event):void
		{
			answerBank = new Array();
			answerBank.push(section0.answer);
			answerBank.push(section1.answer);
			
			trace(answerBank);
			trace(correctBank);
			
		}

	}

}